package com.zzl.bonds.ticket.constant.type;

/**
 * ticket_data表中的枚举
 * 票据类型 1、开立 2、转让 3、融资 4、兑付
 * @author : gull
 * @date : 2022/2/24 20:06
 */
public enum TicketActionTypeEnum {
    /**
     * 1、开立 2、转让 3、融资 4、兑付
     */
    TICKET_TYPE_TICKET(0, "我的票据"),
    TICKET_TYPE_OPEN(1, "开立"),
    TICKET_TYPE_TRANSFER(2, "转让"),
    TICKET_TYPE_FINANCE(3, "融资"),
    TICKET_TYPE_CASHING(4, "兑付"),
    ;

    private Integer code;
    private String value;


    TicketActionTypeEnum(Integer code, String value) {
        this.code = code;
        this.value = value;
    }

    public static String getValue(Integer code) {
        for (TicketActionTypeEnum statusEnum : TicketActionTypeEnum.values()) {
            if (statusEnum.code.equals(code)) {
                return statusEnum.value;
            }
        }
        return "";
    }


    public Integer getCode() {
        return code;
    }

    public String getValue() {
        return value;
    }
}
